home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1995-12-11 | 11.0 KB | [ TEXT/MMCC]
open in: MacOS 8.1
extracted
|
Win98
extracted
|
DOS
extracted
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary ).
Confidence Program Detection Match Type Support
10%
dexvert
MacBinary (archive/macBinary)
fallback
Supported
1%
dexvert
MS-DOS Code Page Info (other/dosCodePage)
ext
Unsupported
1%
dexvert
Text File (text/txt)
fallback
Supported
100%
file
MacBinary II, inited, Sun Dec 10 19:16:42 1995, modified Sun Dec 10 19:16:42 1995, creator 'MMCC', type ASCII, 10359 bytes "AppleEventHandling.cp" , at 0x28f7 648 bytes resource
default (weak)
99%
file
data
default
74%
TrID
Macintosh plain text (MacBinary)
default
25%
TrID
MacBinary 2
default (weak)
100%
siegfried
fmt/1762 MacBinary (II)
default
100%
lsar
MacBinary
default
id metadata key value macFileType [ TEXT] macFileCreator [ MMCC]
hex view +--------+-------------------------+-------------------------+--------+--------+ |00000000| 00 15 41 70 70 6c 65 45 | 76 65 6e 74 48 61 6e 64 |..AppleE|ventHand| |00000010| 6c 69 6e 67 2e 63 70 00 | 00 00 00 00 00 00 00 00 |ling.cp.|........| |00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00000040| 00 54 45 58 54 4d 4d 43 | 43 01 00 00 00 00 00 00 |.TEXTMMC|C.......| |00000050| 00 00 00 00 00 28 77 00 | 00 02 88 ac f1 28 ea ac |.....(w.|.....(..| |00000060| f1 28 ea 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.(......|........| |00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 5b e3 00 00 |........|....[...| |00000080| 2f 2a 0d 09 46 69 6c 65 | 3a 09 09 41 70 70 6c 65 |/*..File|:..Apple| |00000090| 45 76 65 6e 74 48 61 6e | 64 6c 69 6e 67 2e 63 70 |EventHan|dling.cp| |000000a0| 0d 0d 09 43 6f 6e 74 61 | 69 6e 73 3a 09 4d 69 6e |...Conta|ins:.Min| |000000b0| 69 6d 61 6c 69 73 74 20 | 73 75 70 70 6f 72 74 20 |imalist |support | |000000c0| 66 6f 72 20 74 68 65 20 | 72 65 71 75 69 72 65 64 |for the |required| |000000d0| 20 61 6e 64 20 44 69 73 | 70 6c 61 79 20 4d 61 6e | and Dis|play Man| |000000e0| 61 67 65 72 20 41 70 70 | 6c 65 45 76 65 6e 74 73 |ager App|leEvents| |000000f0| 0d 09 09 09 09 57 65 20 | 61 6c 73 6f 20 73 75 70 |.....We |also sup| |00000100| 70 6f 72 74 20 6f 70 65 | 6e 6e 69 6e 67 20 61 6e |port ope|nning an| |00000110| 64 20 70 72 69 6e 74 69 | 6e 67 20 d2 4c 65 74 74 |d printi|ng .Lett| |00000120| 65 72 53 70 65 63 d3 20 | 64 6f 63 75 6d 65 6e 74 |erSpec. |document| |00000130| 73 20 66 6f 72 20 41 4f | 43 45 2e 0d 09 09 09 09 |s for AO|CE......| |00000140| 0d 09 09 09 09 54 6f 20 | 72 65 61 6c 6c 79 20 73 |.....To |really s| |00000150| 75 70 70 6f 72 74 20 41 | 70 70 6c 65 53 63 72 69 |upport A|ppleScri| |00000160| 70 74 aa 2c 20 77 65 d5 | 6c 6c 20 6e 65 65 64 20 |pt., we.|ll need | |00000170| 74 6f 20 64 6f 20 41 4c | 4f 54 20 6d 6f 72 65 20 |to do AL|OT more | |00000180| 77 6f 72 6b 20 69 6e 20 | 68 65 72 65 2e 0d 0d 09 |work in |here....| |00000190| 57 72 69 74 74 65 6e 20 | 62 79 3a 20 44 61 76 65 |Written |by: Dave| |000001a0| 20 46 61 6c 6b 65 6e 62 | 75 72 67 0d 0d 09 43 6f | Falkenb|urg...Co| |000001b0| 70 79 72 69 67 68 74 3a | 09 a9 20 31 39 39 33 2d |pyright:|.. 1993-| |000001c0| 39 34 20 62 79 20 44 61 | 76 65 20 46 61 6c 6b 65 |94 by Da|ve Falke| |000001d0| 6e 62 75 72 67 2c 20 61 | 6c 6c 20 72 69 67 68 74 |nburg, a|ll right| |000001e0| 73 20 72 65 73 65 72 76 | 65 64 2e 0d 0d 09 43 68 |s reserv|ed....Ch| |000001f0| 61 6e 67 65 20 48 69 73 | 74 6f 72 79 20 28 6d 6f |ange His|tory (mo| |00000200| 73 74 20 72 65 63 65 6e | 74 20 66 69 72 73 74 29 |st recen|t first)| |00000210| 3a 0d 09 20 0d 09 09 20 | 3c 37 3e 09 31 32 2f 31 |:.. ... |<7>.12/1| |00000220| 35 2f 39 34 09 44 52 46 | 09 09 41 64 64 65 64 20 |5/94.DRF|..Added | |00000230| 43 68 6f 6f 73 65 41 70 | 70 6c 69 63 61 74 69 6f |ChooseAp|plicatio| |00000240| 6e 41 73 41 45 54 61 72 | 67 65 74 2e 0d 09 09 20 |nAsAETar|get.... | |00000250| 3c 36 3e 09 31 31 2f 32 | 33 2f 39 34 09 44 52 46 |<6>.11/2|3/94.DRF| |00000260| 09 09 49 6e 73 74 61 6c | 6c 41 70 70 6c 65 45 76 |..Instal|lAppleEv| |00000270| 65 6e 74 48 61 6e 64 6c | 65 72 73 20 69 73 20 6e |entHandl|ers is n| |00000280| 6f 77 20 63 61 6c 6c 65 | 64 20 49 6e 69 74 41 70 |ow calle|d InitAp| |00000290| 70 6c 65 45 76 65 6e 74 | 52 6f 75 74 69 6e 65 73 |pleEvent|Routines| |000002a0| 2e 0d 09 09 09 09 09 09 | 09 09 09 41 6c 73 6f 20 |........|...Also | |000002b0| 61 64 64 65 64 20 61 20 | 75 73 65 66 75 6c 20 67 |added a |useful g| |000002c0| 6c 6f 62 61 6c 3a 20 67 | 54 68 69 73 50 72 6f 63 |lobal: g|ThisProc| |000002d0| 65 73 73 44 65 73 63 20 | 66 6f 72 20 73 65 6c 66 |essDesc |for self| |000002e0| 20 74 61 72 67 65 74 74 | 69 6e 67 0d 09 09 09 09 | targett|ing.....| |000002f0| 09 09 09 09 09 6f 66 20 | 41 70 70 6c 65 45 76 65 |.....of |AppleEve| |00000300| 6e 74 73 2e 0d 09 09 20 | 3c 35 3e 09 31 31 2f 31 |nts.... |<5>.11/1| |00000310| 36 2f 39 34 09 44 52 46 | 09 09 41 64 64 20 53 74 |6/94.DRF|..Add St| |00000320| 61 6e 64 61 72 64 41 45 | 49 64 6c 65 50 72 6f 63 |andardAE|IdleProc| |00000330| 20 66 6f 72 20 70 65 6f | 70 6c 65 20 77 68 6f 20 | for peo|ple who | |00000340| 6c 69 6b 65 20 75 73 69 | 6e 67 20 41 45 53 65 6e |like usi|ng AESen| |00000350| 64 20 77 69 74 68 0d 09 | 09 09 09 09 09 09 09 09 |d with..|........| |00000360| 6b 41 45 57 61 69 74 52 | 65 70 6c 79 2e 0d 09 09 |kAEWaitR|eply....| |00000370| 20 3c 34 3e 09 31 31 2f | 31 32 2f 39 34 09 44 52 | <4>.11/|12/94.DR| |00000380| 46 09 09 52 65 6d 6f 76 | 65 64 20 65 78 74 72 61 |F..Remov|ed extra| |00000390| 20 23 69 6e 63 6c 75 64 | 65 2e 0d 09 09 20 3c 33 | #includ|e.... <3| |000003a0| 3e 09 20 39 2f 32 37 2f | 39 34 09 44 52 46 09 20 |>. 9/27/|94.DRF. | |000003b0| 09 41 70 70 4c 69 62 2e | 68 20 69 73 20 6e 6f 77 |.AppLib.|h is now| |000003c0| 20 53 70 72 6f 63 6b 65 | 74 2e 68 0d 09 09 20 3c | Sprocke|t.h... <| |000003d0| 32 3e 09 20 20 39 2f 34 | 2f 39 34 09 44 52 46 09 |2>. 9/4|/94.DRF.| |000003e0| 09 41 64 64 65 64 20 73 | 74 75 62 20 54 65 78 74 |.Added s|tub Text| |000003f0| 20 53 65 72 76 69 63 65 | 73 20 41 70 70 6c 65 45 | Service|s AppleE| |00000400| 76 65 6e 74 20 68 61 6e | 64 6c 65 72 73 2e 0d 20 |vent han|dlers.. | |00000410| 2a 2f 0d 0d 23 69 6e 63 | 6c 75 64 65 20 22 53 70 |*/..#inc|lude "Sp| |00000420| 72 6f 63 6b 65 74 2e 68 | 22 0d 0d 23 69 6e 63 6c |rocket.h|"..#incl| |00000430| 75 64 65 20 3c 41 70 70 | 6c 65 45 76 65 6e 74 73 |ude <App|leEvents| |00000440| 2e 68 3e 0d 23 69 6e 63 | 6c 75 64 65 20 3c 45 72 |.h>.#inc|lude <Er| |00000450| 72 6f 72 73 2e 68 3e 0d | 23 69 6e 63 6c 75 64 65 |rors.h>.|#include| |00000460| 20 3c 44 69 73 70 6c 61 | 79 73 2e 68 3e 09 09 09 | <Displa|ys.h>...| |00000470| 2f 2f 09 66 6f 72 20 44 | 69 73 70 6c 61 79 20 4d |//.for D|isplay M| |00000480| 61 6e 61 67 65 72 20 41 | 70 70 6c 65 45 76 65 6e |anager A|ppleEven| |00000490| 74 20 63 6f 6e 73 74 61 | 6e 74 73 0d 23 69 6e 63 |t consta|nts.#inc| |000004a0| 6c 75 64 65 20 3c 4f 43 | 45 53 74 61 6e 64 61 72 |lude <OC|EStandar| |000004b0| 64 4d 61 69 6c 2e 68 3e | 09 2f 2f 09 66 6f 72 20 |dMail.h>|.//.for | |000004c0| 4c 65 74 74 65 72 53 70 | 65 63 0d 0d 23 69 66 09 |LetterSp|ec..#if.| |000004d0| 71 49 6e 6c 69 6e 65 49 | 6e 70 75 74 41 77 61 72 |qInlineI|nputAwar| |000004e0| 65 0d 23 69 6e 63 6c 75 | 64 65 20 3c 54 65 78 74 |e.#inclu|de <Text| |000004f0| 53 65 72 76 69 63 65 73 | 2e 68 3e 0d 23 65 6e 64 |Services|.h>.#end| |00000500| 69 66 0d 0d 23 69 6e 63 | 6c 75 64 65 20 22 41 70 |if..#inc|lude "Ap| |00000510| 70 6c 65 45 76 65 6e 74 | 48 61 6e 64 6c 69 6e 67 |pleEvent|Handling| |00000520| 2e 68 22 0d 0d 73 74 61 | 74 69 63 20 70 61 73 63 |.h"..sta|tic pasc| |00000530| 61 6c 20 42 6f 6f 6c 65 | 61 6e 20 53 74 61 6e 64 |al Boole|an Stand| |00000540| 61 72 64 41 45 49 64 6c | 65 50 72 6f 63 28 45 76 |ardAEIdl|eProc(Ev| |00000550| 65 6e 74 52 65 63 6f 72 | 64 20 2a 74 68 65 45 76 |entRecor|d *theEv| |00000560| 65 6e 74 2c 20 6c 6f 6e | 67 20 2a 73 6c 65 65 70 |ent, lon|g *sleep| |00000570| 54 69 6d 65 2c 20 52 67 | 6e 48 61 6e 64 6c 65 20 |Time, Rg|nHandle | |00000580| 2a 6d 6f 75 73 65 52 67 | 6e 29 3b 0d 09 0d 0d 41 |*mouseRg|n);....A| |00000590| 45 44 65 73 63 09 09 67 | 54 68 69 73 50 72 6f 63 |EDesc..g|ThisProc| |000005a0| 65 73 73 44 65 73 63 3b | 0d 0d 76 6f 69 64 0d 49 |essDesc;|..void.I| |000005b0| 6e 69 74 41 70 70 6c 65 | 45 76 65 6e 74 52 6f 75 |nitApple|EventRou| |000005c0| 74 69 6e 65 73 28 76 6f | 69 64 29 0d 09 7b 0d 09 |tines(vo|id)..{..| |000005d0| 50 72 6f 63 65 73 73 53 | 65 72 69 61 6c 4e 75 6d |ProcessS|erialNum| |000005e0| 62 65 72 09 74 68 69 73 | 50 72 6f 63 65 73 73 3b |ber.this|Process;| |000005f0| 0d 0d 09 2f 2f 09 43 72 | 65 61 74 65 20 75 73 65 |...//.Cr|eate use| |00000600| 66 75 6c 20 41 45 20 54 | 61 72 67 65 74 73 20 66 |ful AE T|argets f| |00000610| 6f 72 20 6f 75 72 20 61 | 70 6c 69 63 61 74 69 6f |or our a|plicatio| |00000620| 6e 0d 0d 09 2f 2f 09 42 | 79 20 62 75 69 6c 64 69 |n...//.B|y buildi| |00000630| 6e 67 20 74 68 65 20 74 | 61 72 67 65 74 20 69 6e |ng the t|arget in| |00000640| 20 74 68 69 73 20 66 61 | 73 68 69 6f 6e 2c 20 77 | this fa|shion, w| |00000650| 65 20 67 65 74 20 74 68 | 65 20 62 65 73 74 20 70 |e get th|e best p| |00000660| 65 72 66 6f 72 6d 61 6e | 63 65 0d 09 2f 2f 09 6f |erforman|ce..//.o| |00000670| 75 74 20 6f 66 20 74 68 | 65 20 41 70 70 6c 65 45 |ut of th|e AppleE| |00000680| 76 65 6e 74 20 6d 61 6e | 61 67 65 72 20 62 65 63 |vent man|ager bec| |00000690| 61 75 73 65 20 69 74 20 | 63 61 6e 20 63 61 6c 6c |ause it |can call| |000006a0| 20 6f 75 72 20 65 76 65 | 6e 74 20 68 61 6e 64 6c | our eve|nt handl| |000006b0| 65 72 73 0d 09 2f 2f 09 | 69 6e 6c 69 6e 65 2e 0d |ers..//.|inline..| |000006c0| 0d 09 74 68 69 73 50 72 | 6f 63 65 73 73 2e 68 69 |..thisPr|ocess.hi| |000006d0| 67 68 4c 6f 6e 67 4f 66 | 50 53 4e 20 09 3d 20 30 |ghLongOf|PSN .= 0| |000006e0| 3b 0d 09 74 68 69 73 50 | 72 6f 63 65 73 73 2e 6c |;..thisP|rocess.l| |000006f0| 6f 77 4c 6f 6e 67 4f 66 | 50 53 4e 20 09 3d 20 6b |owLongOf|PSN .= k| |00000700| 43 75 72 72 65 6e 74 50 | 72 6f 63 65 73 73 3b 0d |CurrentP|rocess;.| |00000710| 09 28 76 6f 69 64 29 20 | 41 45 43 72 65 61 74 65 |.(void) |AECreate| |00000720| 44 65 73 63 28 74 79 70 | 65 50 72 6f 63 65 73 73 |Desc(typ|eProcess| |00000730| 53 65 72 69 61 6c 4e 75 | 6d 62 65 72 2c 28 50 74 |SerialNu|mber,(Pt| |00000740| 72 29 26 74 68 69 73 50 | 72 6f 63 65 73 73 2c 20 |r)&thisP|rocess, | |00000750| 73 69 7a 65 6f 66 28 50 | 72 6f 63 65 73 73 53 65 |sizeof(P|rocessSe| |00000760| 72 69 61 6c 4e 75 6d 62 | 65 72 29 2c 26 67 54 68 |rialNumb|er),&gTh| |00000770| 69 73 50 72 6f 63 65 73 | 73 44 65 73 63 29 3b 0d |isProces|sDesc);.| |00000780| 0d 0d 09 2f 2f 09 49 74 | d5 73 20 70 72 6f 62 61 |...//.It|.s proba| |00000790| 62 6c 79 20 6d 6f 72 65 | 20 65 66 66 69 63 69 65 |bly more| efficie| |000007a0| 6e 74 20 74 6f 20 75 73 | 65 20 61 20 74 61 62 6c |nt to us|e a tabl| |000007b0| 65 20 74 6f 20 69 6e 73 | 74 61 6c 6c 20 74 68 65 |e to ins|tall the| |000007c0| 73 65 20 68 61 6e 64 6c | 65 72 73 c9 0d 09 0d 09 |se handl|ers.....| |000007d0| 28 76 6f 69 64 29 20 41 | 45 49 6e 73 74 61 6c 6c |(void) A|EInstall| |000007e0| 45 76 65 6e 74 48 61 6e | 64 6c 65 72 28 6b 43 6f |EventHan|dler(kCo| |000007f0| 72 65 45 76 65 6e 74 43 | 6c 61 73 73 2c 6b 41 45 |reEventC|lass,kAE| |00000800| 4f 70 65 6e 41 70 70 6c | 69 63 61 74 69 6f 6e 2c |OpenAppl|ication,| |00000810| 4e 65 77 41 45 45 76 65 | 6e 74 48 61 6e 64 6c 65 |NewAEEve|ntHandle| |00000820| 72 50 72 6f 63 28 48 61 | 6e 64 6c 65 4f 70 65 6e |rProc(Ha|ndleOpen| |00000830| 41 70 70 6c 69 63 61 74 | 69 6f 6e 29 2c 30 2c 66 |Applicat|ion),0,f| |00000840| 61 6c 73 65 29 3b 0d 09 | 28 76 6f 69 64 29 20 41 |alse);..|(void) A| |00000850| 45 49 6e 73 74 61 6c 6c | 45 76 65 6e 74 48 61 6e |EInstall|EventHan| |00000860| 64 6c 65 72 28 6b 43 6f | 72 65 45 76 65 6e 74 43 |dler(kCo|reEventC| |00000870| 6c 61 73 73 2c 6b 41 45 | 4f 70 65 6e 44 6f 63 75 |lass,kAE|OpenDocu| |00000880| 6d 65 6e 74 73 2c 4e 65 | 77 41 45 45 76 65 6e 74 |ments,Ne|wAEEvent| |00000890| 48 61 6e 64 6c 65 72 50 | 72 6f 63 28 48 61 6e 64 |HandlerP|roc(Hand| |000008a0| 6c 65 4f 70 65 6e 44 6f | 63 75 6d 65 6e 74 73 29 |leOpenDo|cuments)| |000008b0| 2c 30 2c 66 61 6c 73 65 | 29 3b 0d 09 28 76 6f 69 |,0,false|);..(voi| |000008c0| 64 29 20 41 45 49 6e 73 | 74 61 6c 6c 45 76 65 6e |d) AEIns|tallEven| |000008d0| 74 48 61 6e 64 6c 65 72 | 28 6b 43 6f 72 65 45 76 |tHandler|(kCoreEv| |000008e0| 65 6e 74 43 6c 61 73 73 | 2c 6b 41 45 50 72 69 6e |entClass|,kAEPrin| |000008f0| 74 44 6f 63 75 6d 65 6e | 74 73 2c 4e 65 77 41 45 |tDocumen|ts,NewAE| |00000900| 45 76 65 6e 74 48 61 6e | 64 6c 65 72 50 72 6f 63 |EventHan|dlerProc| |00000910| 28 48 61 6e 64 6c 65 50 | 72 69 6e 74 44 6f 63 75 |(HandleP|rintDocu| |00000920| 6d 65 6e 74 73 29 2c 30 | 2c 66 61 6c 73 65 29 3b |ments),0|,false);| |00000930| 0d 09 28 76 6f 69 64 29 | 20 41 45 49 6e 73 74 61 |..(void)| AEInsta| |00000940| 6c 6c 45 76 65 6e 74 48 | 61 6e 64 6c 65 72 28 6b |llEventH|andler(k| |00000950| 43 6f 72 65 45 76 65 6e | 74 43 6c 61 73 73 2c 6b |CoreEven|tClass,k| |00000960| 41 45 51 75 69 74 41 70 | 70 6c 69 63 61 74 69 6f |AEQuitAp|plicatio| |00000970| 6e 2c 4e 65 77 41 45 45 | 76 65 6e 74 48 61 6e 64 |n,NewAEE|ventHand| |00000980| 6c 65 72 50 72 6f 63 28 | 48 61 6e 64 6c 65 51 75 |lerProc(|HandleQu| |00000990| 69 74 41 70 70 6c 69 63 | 61 74 69 6f 6e 29 2c 30 |itApplic|ation),0| |000009a0| 2c 66 61 6c 73 65 29 3b | 0d 0d 09 2f 2f 09 72 65 |,false);|...//.re| |000009b0| 67 61 72 64 6c 65 73 73 | 20 6f 66 20 77 68 65 74 |gardless| of whet| |000009c0| 68 65 72 20 6f 72 20 6e | 6f 74 20 77 65 20 68 61 |her or n|ot we ha| |000009d0| 76 65 20 74 68 65 20 64 | 69 73 70 6c 61 79 20 6d |ve the d|isplay m| |000009e0| 61 6e 61 67 65 72 2c 20 | 67 6f 20 61 68 65 61 64 |anager, |go ahead| |000009f0| 20 61 6e 64 20 72 65 67 | 69 73 74 65 72 20 61 6e | and reg|ister an| |00000a00| 20 41 70 70 6c 65 45 76 | 65 6e 74 20 68 61 6e 64 | AppleEv|ent hand| |00000a10| 6c 65 72 0d 09 28 76 6f | 69 64 29 20 41 45 49 6e |ler..(vo|id) AEIn| |00000a20| 73 74 61 6c 6c 45 76 65 | 6e 74 48 61 6e 64 6c 65 |stallEve|ntHandle| |00000a30| 72 28 6b 43 6f 72 65 45 | 76 65 6e 74 43 6c 61 73 |r(kCoreE|ventClas| |00000a40| 73 2c 6b 41 45 53 79 73 | 74 65 6d 43 6f 6e 66 69 |s,kAESys|temConfi| |00000a50| 67 4e 6f 74 69 63 65 2c | 4e 65 77 41 45 45 76 65 |gNotice,|NewAEEve| |00000a60| 6e 74 48 61 6e 64 6c 65 | 72 50 72 6f 63 28 48 61 |ntHandle|rProc(Ha| |00000a70| 6e 64 6c 65 53 79 73 74 | 65 6d 43 6f 6e 66 69 67 |ndleSyst|emConfig| |00000a80| 4e 6f 74 69 63 65 29 2c | 30 2c 66 61 6c 73 65 29 |Notice),|0,false)| |00000a90| 3b 0d 0d 23 69 66 09 71 | 49 6e 6c 69 6e 65 49 6e |;..#if.q|InlineIn| |00000aa0| 70 75 74 41 77 61 72 65 | 0d 09 69 66 20 28 67 48 |putAware|..if (gH| |00000ab0| 61 73 54 65 78 74 53 65 | 72 76 69 63 65 73 29 0d |asTextSe|rvices).| |00000ac0| 09 09 7b 0d 09 09 28 76 | 6f 69 64 29 20 41 45 49 |..{...(v|oid) AEI| |00000ad0| 6e 73 74 61 6c 6c 45 76 | 65 6e 74 48 61 6e 64 6c |nstallEv|entHandl| |00000ae0| 65 72 28 6b 54 65 78 74 | 53 65 72 76 69 63 65 43 |er(kText|ServiceC| |00000af0| 6c 61 73 73 2c 6b 55 70 | 64 61 74 65 41 63 74 69 |lass,kUp|dateActi| |00000b00| 76 65 49 6e 70 75 74 41 | 72 65 61 2c 4e 65 77 41 |veInputA|rea,NewA| |00000b10| 45 45 76 65 6e 74 48 61 | 6e 64 6c 65 72 50 72 6f |EEventHa|ndlerPro| |00000b20| 63 28 48 61 6e 64 6c 65 | 54 65 78 74 53 65 72 76 |c(Handle|TextServ| |00000b30| 69 63 65 73 55 70 64 61 | 74 65 41 63 74 69 76 65 |icesUpda|teActive| |00000b40| 49 6e 70 75 74 41 72 65 | 61 29 2c 30 2c 66 61 6c |InputAre|a),0,fal| |00000b50| 73 65 29 3b 0d 09 09 28 | 76 6f 69 64 29 20 41 45 |se);...(|void) AE| |00000b60| 49 6e 73 74 61 6c 6c 45 | 76 65 6e 74 48 61 6e 64 |InstallE|ventHand| |00000b70| 6c 65 72 28 6b 54 65 78 | 74 53 65 72 76 69 63 65 |ler(kTex|tService| |00000b80| 43 6c 61 73 73 2c 6b 50 | 6f 73 32 4f 66 66 73 65 |Class,kP|os2Offse| |00000b90| 74 2c 4e 65 77 41 45 45 | 76 65 6e 74 48 61 6e 64 |t,NewAEE|ventHand| |00000ba0| 6c 65 72 50 72 6f 63 28 | 48 61 6e 64 6c 65 54 65 |lerProc(|HandleTe| |00000bb0| 78 74 53 65 72 76 69 63 | 65 73 50 6f 73 32 4f 66 |xtServic|esPos2Of| |00000bc0| 66 73 65 74 29 2c 30 2c | 66 61 6c 73 65 29 3b 0d |fset),0,|false);.| |00000bd0| 09 09 28 76 6f 69 64 29 | 20 41 45 49 6e 73 74 61 |..(void)| AEInsta| |00000be0| 6c 6c 45 76 65 6e 74 48 | 61 6e 64 6c 65 72 28 6b |llEventH|andler(k| |00000bf0| 54 65 78 74 53 65 72 76 | 69 63 65 43 6c 61 73 73 |TextServ|iceClass| |00000c00| 2c 6b 4f 66 66 73 65 74 | 32 50 6f 73 2c 4e 65 77 |,kOffset|2Pos,New| |00000c10| 41 45 45 76 65 6e 74 48 | 61 6e 64 6c 65 72 50 72 |AEEventH|andlerPr| |00000c20| 6f 63 28 48 61 6e 64 6c | 65 54 65 78 74 53 65 72 |oc(Handl|eTextSer| |00000c30| 76 69 63 65 73 4f 66 66 | 73 65 74 32 50 6f 73 29 |vicesOff|set2Pos)| |00000c40| 2c 30 2c 66 61 6c 73 65 | 29 3b 0d 09 09 2f 2f 09 |,0,false|);...//.| |00000c50| 77 65 20 64 6f 6e d5 74 | 20 6e 65 65 64 20 74 6f |we don.t| need to| |00000c60| 20 68 61 6e 64 6c 65 20 | 3c 6b 54 65 78 74 53 65 | handle |<kTextSe| |00000c70| 72 76 69 63 65 43 6c 61 | 73 73 2c 6b 53 68 6f 77 |rviceCla|ss,kShow| |00000c80| 48 69 64 65 49 6e 70 75 | 74 57 69 6e 64 6f 77 3e |HideInpu|tWindow>| |00000c90| 20 65 76 65 6e 74 73 0d | 09 09 7d 0d 23 65 6e 64 | events.|..}.#end| |00000ca0| 69 66 0d 09 7d 0d 0d 0d | 4f 53 45 72 72 0d 43 68 |if..}...|OSErr.Ch| |00000cb0| 65 63 6b 41 70 70 6c 65 | 45 76 65 6e 74 46 6f 72 |eckApple|EventFor| |00000cc0| 4d 69 73 73 69 6e 67 50 | 61 72 61 6d 73 28 41 70 |MissingP|arams(Ap| |00000cd0| 70 6c 65 45 76 65 6e 74 | 20 2a 74 68 65 41 70 70 |pleEvent| *theApp| |00000ce0| 6c 65 45 76 65 6e 74 29 | 0d 09 7b 0d 09 44 65 73 |leEvent)|..{..Des| |00000cf0| 63 54 79 70 65 09 72 65 | 74 75 72 6e 65 64 54 79 |cType.re|turnedTy| |00000d00| 70 65 3b 0d 09 53 69 7a | 65 09 09 61 63 74 75 61 |pe;..Siz|e..actua| |00000d10| 6c 53 69 7a 65 3b 0d 09 | 4f 53 45 72 72 09 09 65 |lSize;..|OSErr..e| |00000d20| 72 72 3b 0d 09 0d 09 65 | 72 72 20 3d 20 41 45 47 |rr;....e|rr = AEG| |00000d30| 65 74 41 74 74 72 69 62 | 75 74 65 50 74 72 28 74 |etAttrib|utePtr(t| |00000d40| 68 65 41 70 70 6c 65 45 | 76 65 6e 74 2c 6b 65 79 |heAppleE|vent,key| |00000d50| 4d 69 73 73 65 64 4b 65 | 79 77 6f 72 64 41 74 74 |MissedKe|ywordAtt| |00000d60| 72 2c 74 79 70 65 57 69 | 6c 64 43 61 72 64 2c 0d |r,typeWi|ldCard,.| |00000d70| 09 09 09 09 09 09 09 26 | 72 65 74 75 72 6e 65 64 |.......&|returned| |00000d80| 54 79 70 65 2c 6e 69 6c | 2c 30 2c 26 61 63 74 75 |Type,nil|,0,&actu| |00000d90| 61 6c 53 69 7a 65 29 3b | 0d 09 0d 09 69 66 20 28 |alSize);|....if (| |00000da0| 65 72 72 20 3d 3d 20 65 | 72 72 41 45 44 65 73 63 |err == e|rrAEDesc| |00000db0| 4e 6f 74 46 6f 75 6e 64 | 29 09 09 2f 2f 09 49 66 |NotFound|)..//.If| |00000dc0| 20 77 65 20 63 6f 75 6c | 64 6e d5 74 20 66 69 6e | we coul|dn.t fin| |00000dd0| 64 20 74 68 65 20 65 72 | 72 6f 72 20 61 74 74 72 |d the er|ror attr| |00000de0| 69 62 75 74 65 0d 09 09 | 72 65 74 75 72 6e 20 6e |ibute...|return n| |00000df0| 6f 45 72 72 3b 09 09 09 | 09 09 2f 2f 09 09 65 76 |oErr;...|..//..ev| |00000e00| 65 72 79 74 68 69 6e 67 | 20 69 73 20 6f 6b 2c 20 |erything| is ok, | |00000e10| 72 65 74 75 72 6e 20 6e | 6f 45 72 72 0d 09 0d 09 |return n|oErr....| |00000e20| 69 66 20 28 65 72 72 20 | 3d 3d 20 6e 6f 45 72 72 |if (err |== noErr| |00000e30| 29 09 09 09 09 09 2f 2f | 09 57 65 20 66 6f 75 6e |).....//|.We foun| |00000e40| 64 20 61 6e 20 65 72 72 | 6f 72 20 61 74 74 72 69 |d an err|or attri| |00000e50| 62 75 74 65 2c 20 73 6f | 0d 09 09 72 65 74 75 72 |bute, so|...retur| |00000e60| 6e 20 65 72 72 41 45 45 | 76 65 6e 74 4e 6f 74 48 |n errAEE|ventNotH| |00000e70| 61 6e 64 6c 65 64 3b 09 | 2f 2f 09 09 74 65 6c 6c |andled;.|//..tell| |00000e80| 20 74 68 65 20 63 6c 69 | 65 6e 74 20 77 65 20 69 | the cli|ent we i| |00000e90| 67 6e 6f 72 65 64 20 74 | 68 65 20 65 76 65 6e 74 |gnored t|he event| |00000ea0| 0d 0d 09 72 65 74 75 72 | 6e 20 65 72 72 3b 09 09 |...retur|n err;..| |00000eb0| 09 09 09 09 09 2f 2f 09 | 53 6f 6d 65 74 68 69 6e |.....//.|Somethin| |00000ec0| 67 20 65 6c 73 65 20 68 | 61 70 70 65 6e 65 64 2c |g else h|appened,| |00000ed0| 20 72 65 74 75 72 6e 20 | 69 74 0d 09 7d 0d 0d 0d | return |it..}...| |00000ee0| 4f 53 45 72 72 0d 43 68 | 6f 6f 73 65 41 70 70 6c |OSErr.Ch|ooseAppl| |00000ef0| 69 63 61 74 69 6f 6e 41 | 73 41 45 54 61 72 67 65 |icationA|sAETarge| |00000f00| 74 28 41 45 41 64 64 72 | 65 73 73 44 65 73 63 20 |t(AEAddr|essDesc | |00000f10| 2a 74 61 72 67 65 74 44 | 65 73 63 2c 20 53 74 72 |*targetD|esc, Str| |00000f20| 69 6e 67 50 74 72 20 70 | 72 6f 6d 70 74 29 0d 09 |ingPtr p|rompt)..| |00000f30| 7b 0d 09 50 6f 72 74 49 | 6e 66 6f 52 65 63 09 09 |{..PortI|nfoRec..| |00000f40| 74 68 65 50 6f 72 74 49 | 6e 66 6f 3b 0d 09 4c 6f |thePortI|nfo;..Lo| |00000f50| 63 61 74 69 6f 6e 4e 61 | 6d 65 52 65 63 09 74 68 |cationNa|meRec.th| |00000f60| 65 4c 6f 63 61 74 69 6f | 6e 3b 0d 09 54 61 72 67 |eLocatio|n;..Targ| |00000f70| 65 74 49 44 09 09 74 68 | 65 54 61 72 67 65 74 49 |etID..th|eTargetI| |00000f80| 44 3b 0d 09 4f 53 45 72 | 72 09 09 09 65 72 72 3b |D;..OSEr|r...err;| |00000f90| 0d 0d 09 65 72 72 20 3d | 20 50 50 43 42 72 6f 77 |...err =| PPCBrow| |00000fa0| 73 65 72 28 70 72 6f 6d | 70 74 2c 20 22 5c 70 22 |ser(prom|pt, "\p"| |00000fb0| 2c 20 66 61 6c 73 65 2c | 20 26 74 68 65 4c 6f 63 |, false,| &theLoc| |00000fc0| 61 74 69 6f 6e 2c 20 26 | 74 68 65 50 6f 72 74 49 |ation, &|thePortI| |00000fd0| 6e 66 6f 2c 20 28 50 50 | 43 46 69 6c 74 65 72 55 |nfo, (PP|CFilterU| |00000fe0| 50 50 29 20 4e 55 4c 4c | 2c 20 22 5c 70 22 29 3b |PP) NULL|, "\p");| |00000ff0| 0d 09 69 66 20 28 65 72 | 72 20 3d 3d 20 6e 6f 45 |..if (er|r == noE| |00001000| 72 72 29 0d 09 09 7b 0d | 09 09 74 68 65 54 61 72 |rr)...{.|..theTar| |00001010| 67 65 74 49 44 2e 6e 61 | 6d 65 20 3d 20 74 68 65 |getID.na|me = the| |00001020| 50 6f 72 74 49 6e 66 6f | 2e 6e 61 6d 65 3b 0d 09 |PortInfo|.name;..| |00001030| 09 74 68 65 54 61 72 67 | 65 74 49 44 2e 6c 6f 63 |.theTarg|etID.loc| |00001040| 61 74 69 6f 6e 20 3d 20 | 74 68 65 4c 6f 63 61 74 |ation = |theLocat| |00001050| 69 6f 6e 3b 0d 0d 09 09 | 65 72 72 20 3d 20 41 45 |ion;....|err = AE| |00001060| 43 72 65 61 74 65 44 65 | 73 63 28 74 79 70 65 54 |CreateDe|sc(typeT| |00001070| 61 72 67 65 74 49 44 2c | 26 74 68 65 54 61 72 67 |argetID,|&theTarg| |00001080| 65 74 49 44 2c 73 69 7a | 65 6f 66 28 74 68 65 54 |etID,siz|eof(theT| |00001090| 61 72 67 65 74 49 44 29 | 2c 74 61 72 67 65 74 44 |argetID)|,targetD| |000010a0| 65 73 63 29 3b 0d 09 09 | 7d 0d 0d 09 72 65 74 75 |esc);...|}...retu| |000010b0| 72 6e 20 65 72 72 3b 0d | 09 7d 0d 0d 0d 4f 53 45 |rn err;.|.}...OSE| |000010c0| 72 72 0d 53 65 6e 64 4f | 70 65 6e 44 6f 63 75 6d |rr.SendO|penDocum| |000010d0| 65 6e 74 54 6f 53 65 6c | 66 28 4c 65 74 74 65 72 |entToSel|f(Letter| |000010e0| 44 65 73 63 72 69 70 74 | 6f 72 20 2a 20 2f 2a 20 |Descript|or * /* | |000010f0| 74 68 65 44 6f 63 75 6d | 65 6e 74 20 2a 2f 29 0d |theDocum|ent */).| |00001100| 09 7b 0d 09 72 65 74 75 | 72 6e 20 6e 6f 45 72 72 |.{..retu|rn noErr| |00001110| 3b 0d 09 7d 0d 0d 0d 4f | 53 45 72 72 0d 53 65 6e |;..}...O|SErr.Sen| |00001120| 64 51 75 69 74 41 70 70 | 6c 69 63 61 74 69 6f 6e |dQuitApp|lication| |00001130| 54 6f 53 65 6c 66 28 29 | 0d 09 7b 0d 09 41 70 70 |ToSelf()|..{..App| |00001140| 6c 65 45 76 65 6e 74 09 | 71 75 69 74 41 45 2c 72 |leEvent.|quitAE,r| |00001150| 65 70 6c 79 41 45 3b 0d | 09 4f 53 45 72 72 09 09 |eplyAE;.|.OSErr..| |00001160| 65 72 72 3b 0d 09 0d 09 | 65 72 72 20 3d 20 41 45 |err;....|err = AE| |00001170| 43 72 65 61 74 65 41 70 | 70 6c 65 45 76 65 6e 74 |CreateAp|pleEvent| |00001180| 28 6b 43 6f 72 65 45 76 | 65 6e 74 43 6c 61 73 73 |(kCoreEv|entClass| |00001190| 2c 20 6b 41 45 51 75 69 | 74 41 70 70 6c 69 63 61 |, kAEQui|tApplica| |000011a0| 74 69 6f 6e 2c 20 26 67 | 54 68 69 73 50 72 6f 63 |tion, &g|ThisProc| |000011b0| 65 73 73 44 65 73 63 2c | 20 6b 41 75 74 6f 47 65 |essDesc,| kAutoGe| |000011c0| 6e 65 72 61 74 65 52 65 | 74 75 72 6e 49 44 2c 20 |nerateRe|turnID, | |000011d0| 6b 41 6e 79 54 72 61 6e | 73 61 63 74 69 6f 6e 49 |kAnyTran|sactionI| |000011e0| 44 2c 20 26 71 75 69 74 | 41 45 29 3b 0d 09 69 66 |D, &quit|AE);..if| |000011f0| 20 28 65 72 72 20 21 3d | 20 6e 6f 45 72 72 29 0d | (err !=| noErr).| |00001200| 09 09 7b 0d 09 09 65 72 | 72 20 3d 20 41 45 53 65 |..{...er|r = AESe| |00001210| 6e 64 28 26 71 75 69 74 | 41 45 2c 26 72 65 70 6c |nd(&quit|AE,&repl| |00001220| 79 41 45 2c 20 6b 41 45 | 4e 6f 52 65 70 6c 79 20 |yAE, kAE|NoReply | |00001230| 2b 20 6b 41 45 43 61 6e | 49 6e 74 65 72 61 63 74 |+ kAECan|Interact| |00001240| 2c 20 6b 41 45 4e 6f 72 | 6d 61 6c 50 72 69 6f 72 |, kAENor|malPrior| |00001250| 69 74 79 2c 20 33 36 30 | 30 2c 20 4e 55 4c 4c 2c |ity, 360|0, NULL,| |00001260| 20 4e 55 4c 4c 29 3b 0d | 09 09 28 76 6f 69 64 29 | NULL);.|..(void)| |00001270| 20 41 45 44 69 73 70 6f | 73 65 44 65 73 63 28 26 | AEDispo|seDesc(&| |00001280| 71 75 69 74 41 45 29 3b | 0d 09 09 7d 0d 09 0d 09 |quitAE);|...}....| |00001290| 72 65 74 75 72 6e 20 6e | 6f 45 72 72 3b 0d 09 7d |return n|oErr;..}| |000012a0| 0d 0d 0d 0d 0d 41 45 49 | 64 6c 65 55 50 50 09 09 |.....AEI|dleUPP..| |000012b0| 53 74 61 6e 64 61 72 64 | 41 45 49 64 6c 65 55 50 |Standard|AEIdleUP| |000012c0| 50 20 3d 20 4e 65 77 41 | 45 49 64 6c 65 50 72 6f |P = NewA|EIdlePro| |000012d0| 63 28 53 74 61 6e 64 61 | 72 64 41 45 49 64 6c 65 |c(Standa|rdAEIdle| |000012e0| 50 72 6f 63 29 3b 0d 0d | 73 74 61 74 69 63 20 70 |Proc);..|static p| |000012f0| 61 73 63 61 6c 20 42 6f | 6f 6c 65 61 6e 0d 53 74 |ascal Bo|olean.St| |00001300| 61 6e 64 61 72 64 41 45 | 49 64 6c 65 50 72 6f 63 |andardAE|IdleProc| |00001310| 28 45 76 65 6e 74 52 65 | 63 6f 72 64 20 2a 74 68 |(EventRe|cord *th| |00001320| 65 45 76 65 6e 74 2c 20 | 6c 6f 6e 67 20 2a 20 2f |eEvent, |long * /| |00001330| 2a 20 73 6c 65 65 70 54 | 69 6d 65 20 2a 2f 2c 20 |* sleepT|ime */, | |00001340| 52 67 6e 48 61 6e 64 6c | 65 20 2a 20 2f 2a 20 6d |RgnHandl|e * /* m| |00001350| 6f 75 73 65 52 67 6e 20 | 2a 2f 29 0d 09 7b 0d 09 |ouseRgn |*/)..{..| |00001360| 48 61 6e 64 6c 65 45 76 | 65 6e 74 28 74 68 65 45 |HandleEv|ent(theE| |00001370| 76 65 6e 74 29 3b 09 09 | 09 2f 2f 09 46 69 72 73 |vent);..|.//.Firs| |00001380| 74 2c 20 61 6c 77 61 79 | 73 20 68 61 6e 64 20 65 |t, alway|s hand e| |00001390| 76 65 6e 74 20 6f 66 66 | 20 74 6f 20 6f 75 72 20 |vent off| to our | |000013a0| 65 76 65 6e 74 20 68 61 | 6e 64 6c 69 6e 67 20 63 |event ha|ndling c| |000013b0| 6f 64 65 0d 09 72 65 74 | 75 72 6e 20 66 61 6c 73 |ode..ret|urn fals| |000013c0| 65 3b 09 09 09 09 09 0d | 09 7d 0d 0d 0d 4f 53 45 |e;......|.}...OSE| |000013d0| 72 72 0d 46 6f 72 45 61 | 63 68 44 6f 63 75 6d 65 |rr.ForEa|chDocume| |000013e0| 6e 74 49 6e 4c 69 73 74 | 28 41 45 44 65 73 63 4c |ntInList|(AEDescL| |000013f0| 69 73 74 20 64 6f 63 75 | 6d 65 6e 74 4c 69 73 74 |ist docu|mentList| |00001400| 2c 45 61 63 68 44 6f 63 | 75 6d 65 6e 74 50 72 6f |,EachDoc|umentPro| |00001410| 63 50 74 72 20 64 6f 63 | 75 6d 65 6e 74 50 72 6f |cPtr doc|umentPro| |00001420| 63 2c 76 6f 69 64 20 2a | 20 64 6f 63 75 6d 65 6e |c,void *| documen| |00001430| 74 50 61 72 61 6d 29 0d | 09 7b 0d 09 6c 6f 6e 67 |tParam).|.{..long| |00001440| 09 09 09 09 64 6f 63 75 | 6d 65 6e 74 43 6f 75 6e |....docu|mentCoun| |00001450| 74 2c 64 6f 63 75 6d 65 | 6e 74 49 6e 64 65 78 3b |t,docume|ntIndex;| |00001460| 0d 09 44 65 73 63 54 79 | 70 65 09 09 09 72 65 74 |..DescTy|pe...ret| |00001470| 75 72 6e 65 64 54 79 70 | 65 3b 0d 09 53 69 7a 65 |urnedTyp|e;..Size| |00001480| 09 09 09 09 61 63 74 75 | 61 6c 53 69 7a 65 3b 0d |....actu|alSize;.| |00001490| 09 4c 65 74 74 65 72 44 | 65 73 63 72 69 70 74 6f |.LetterD|escripto| |000014a0| 72 09 74 68 65 4c 65 74 | 74 65 72 44 65 73 63 3b |r.theLet|terDesc;| |000014b0| 0d 09 41 45 4b 65 79 77 | 6f 72 64 09 09 09 6b 65 |..AEKeyw|ord...ke| |000014c0| 79 77 6f 72 64 3b 0d 09 | 4f 53 45 72 72 09 09 09 |yword;..|OSErr...| |000014d0| 09 65 72 72 3b 0d 0d 09 | 69 66 20 28 28 65 72 72 |.err;...|if ((err| |000014e0| 20 3d 20 41 45 43 6f 75 | 6e 74 49 74 65 6d 73 28 | = AECou|ntItems(| |000014f0| 26 64 6f 63 75 6d 65 6e | 74 4c 69 73 74 2c 26 64 |&documen|tList,&d| |00001500| 6f 63 75 6d 65 6e 74 43 | 6f 75 6e 74 29 29 20 21 |ocumentC|ount)) !| |00001510| 3d 20 6e 6f 45 72 72 29 | 0d 09 09 72 65 74 75 72 |= noErr)|...retur| |00001520| 6e 20 65 72 72 3b 0d 09 | 0d 09 66 6f 72 20 28 64 |n err;..|..for (d| |00001530| 6f 63 75 6d 65 6e 74 49 | 6e 64 65 78 3d 31 3b 20 |ocumentI|ndex=1; | |00001540| 64 6f 63 75 6d 65 6e 74 | 49 6e 64 65 78 20 3c 3d |document|Index <=| |00001550| 20 64 6f 63 75 6d 65 6e | 74 43 6f 75 6e 74 3b 20 | documen|tCount; | |00001560| 64 6f 63 75 6d 65 6e 74 | 49 6e 64 65 78 2b 2b 29 |document|Index++)| |00001570| 0d 09 09 7b 0d 09 09 2f | 2f 09 57 68 61 74 20 6b |...{.../|/.What k| |00001580| 69 6e 64 20 6f 66 20 64 | 6f 63 75 6d 65 6e 74 20 |ind of d|ocument | |00001590| 69 73 20 69 74 3f 0d 09 | 09 69 66 20 28 28 65 72 |is it?..|.if ((er| |000015a0| 72 20 3d 20 41 45 53 69 | 7a 65 4f 66 4e 74 68 49 |r = AESi|zeOfNthI| |000015b0| 74 65 6d 28 26 64 6f 63 | 75 6d 65 6e 74 4c 69 73 |tem(&doc|umentLis| |000015c0| 74 2c 64 6f 63 75 6d 65 | 6e 74 49 6e 64 65 78 2c |t,docume|ntIndex,| |000015d0| 26 72 65 74 75 72 6e 65 | 64 54 79 70 65 2c 26 61 |&returne|dType,&a| |000015e0| 63 74 75 61 6c 53 69 7a | 65 29 29 20 21 3d 20 6e |ctualSiz|e)) != n| |000015f0| 6f 45 72 72 29 0d 09 09 | 09 72 65 74 75 72 6e 20 |oErr)...|.return | |00001600| 65 72 72 3b 0d 09 09 0d | 09 09 2f 2f 09 49 73 20 |err;....|..//.Is | |00001610| 69 74 20 61 6e 20 41 4f | 43 45 20 6c 65 74 74 65 |it an AO|CE lette| |00001620| 72 3f 0d 09 09 69 66 20 | 28 72 65 74 75 72 6e 65 |r?...if |(returne| |00001630| 64 54 79 70 65 20 3d 3d | 20 74 79 70 65 4c 65 74 |dType ==| typeLet| |00001640| 74 65 72 53 70 65 63 29 | 0d 09 09 09 7b 0d 09 09 |terSpec)|....{...| |00001650| 09 2f 2f 09 49 74 d5 73 | 20 61 20 6c 65 74 74 65 |.//.It.s| a lette| |00001660| 72 0d 09 09 09 74 68 65 | 4c 65 74 74 65 72 44 65 |r....the|LetterDe| |00001670| 73 63 2e 6f 6e 44 69 73 | 6b 20 3d 20 66 61 6c 73 |sc.onDis|k = fals| |00001680| 65 3b 0d 09 09 09 65 72 | 72 20 3d 20 41 45 47 65 |e;....er|r = AEGe| |00001690| 74 4e 74 68 50 74 72 28 | 26 64 6f 63 75 6d 65 6e |tNthPtr(|&documen| |000016a0| 74 4c 69 73 74 2c 64 6f | 63 75 6d 65 6e 74 49 6e |tList,do|cumentIn| |000016b0| 64 65 78 2c 74 79 70 65 | 4c 65 74 74 65 72 53 70 |dex,type|LetterSp| |000016c0| 65 63 2c 26 6b 65 79 77 | 6f 72 64 2c 26 72 65 74 |ec,&keyw|ord,&ret| |000016d0| 75 72 6e 65 64 54 79 70 | 65 2c 0d 09 09 09 09 09 |urnedTyp|e,......| |000016e0| 09 09 09 28 50 74 72 29 | 20 26 74 68 65 4c 65 74 |...(Ptr)| &theLet| |000016f0| 74 65 72 44 65 73 63 2e | 75 2e 6d 61 69 6c 62 6f |terDesc.|u.mailbo| |00001700| 78 53 70 65 63 2c 20 73 | 69 7a 65 6f 66 28 74 68 |xSpec, s|izeof(th| |00001710| 65 4c 65 74 74 65 72 44 | 65 73 63 2e 75 2e 6d 61 |eLetterD|esc.u.ma| |00001720| 69 6c 62 6f 78 53 70 65 | 63 29 2c 26 61 63 74 75 |ilboxSpe|c),&actu| |00001730| 61 6c 53 69 7a 65 29 3b | 0d 09 09 09 7d 0d 09 09 |alSize);|....}...| |00001740| 65 6c 73 65 0d 09 09 09 | 7b 0d 09 09 09 2f 2f 09 |else....|{....//.| |00001750| 49 74 d5 73 20 6a 75 73 | 74 20 61 20 6e 6f 72 6d |It.s jus|t a norm| |00001760| 61 6c 20 64 6f 63 75 6d | 65 6e 74 20 66 69 6c 65 |al docum|ent file| |00001770| 0d 09 09 09 74 68 65 4c | 65 74 74 65 72 44 65 73 |....theL|etterDes| |00001780| 63 2e 6f 6e 44 69 73 6b | 20 3d 20 74 72 75 65 3b |c.onDisk| = true;| |00001790| 0d 09 09 09 65 72 72 20 | 3d 20 41 45 47 65 74 4e |....err |= AEGetN| |000017a0| 74 68 50 74 72 28 26 64 | 6f 63 75 6d 65 6e 74 4c |thPtr(&d|ocumentL| |000017b0| 69 73 74 2c 64 6f 63 75 | 6d 65 6e 74 49 6e 64 65 |ist,docu|mentInde| |000017c0| 78 2c 74 79 70 65 46 53 | 53 2c 26 6b 65 79 77 6f |x,typeFS|S,&keywo| |000017d0| 72 64 2c 26 72 65 74 75 | 72 6e 65 64 54 79 70 65 |rd,&retu|rnedType| |000017e0| 2c 0d 09 09 09 09 09 09 | 09 09 28 50 74 72 29 20 |,.......|..(Ptr) | |000017f0| 26 74 68 65 4c 65 74 74 | 65 72 44 65 73 63 2e 75 |&theLett|erDesc.u| |00001800| 2e 66 69 6c 65 53 70 65 | 63 2c 73 69 7a 65 6f 66 |.fileSpe|c,sizeof| |00001810| 28 74 68 65 4c 65 74 74 | 65 72 44 65 73 63 2e 75 |(theLett|erDesc.u| |00001820| 2e 66 69 6c 65 53 70 65 | 63 29 2c 26 61 63 74 75 |.fileSpe|c),&actu| |00001830| 61 6c 53 69 7a 65 29 3b | 0d 09 09 09 7d 0d 09 09 |alSize);|....}...| |00001840| 09 0d 09 09 69 66 20 28 | 65 72 72 20 3d 3d 20 6e |....if (|err == n| |00001850| 6f 45 72 72 29 0d 09 09 | 09 28 2a 64 6f 63 75 6d |oErr)...|.(*docum| |00001860| 65 6e 74 50 72 6f 63 29 | 28 26 74 68 65 4c 65 74 |entProc)|(&theLet| |00001870| 74 65 72 44 65 73 63 2c | 64 6f 63 75 6d 65 6e 74 |terDesc,|document| |00001880| 50 61 72 61 6d 29 3b 0d | 09 09 65 6c 73 65 0d 09 |Param);.|..else..| |00001890| 09 09 62 72 65 61 6b 3b | 0d 09 09 7d 0d 09 0d 09 |..break;|...}....| |000018a0| 72 65 74 75 72 6e 09 65 | 72 72 3b 0d 09 7d 0d 0d |return.e|rr;..}..| |000018b0| 09 0d 70 61 73 63 61 6c | 20 4f 53 45 72 72 0d 48 |..pascal| OSErr.H| |000018c0| 61 6e 64 6c 65 4f 70 65 | 6e 41 70 70 6c 69 63 61 |andleOpe|nApplica| |000018d0| 74 69 6f 6e 28 41 70 70 | 6c 65 45 76 65 6e 74 20 |tion(App|leEvent | |000018e0| 2a 74 68 65 41 70 70 6c | 65 45 76 65 6e 74 2c 41 |*theAppl|eEvent,A| |000018f0| 70 70 6c 65 45 76 65 6e | 74 20 2a 20 2f 2a 72 65 |ppleEven|t * /*re| |00001900| 70 6c 79 2a 2f 2c 6c 6f | 6e 67 20 2f 2a 72 65 66 |ply*/,lo|ng /*ref| |00001910| 43 6f 6e 2a 2f 29 0d 09 | 7b 0d 09 4f 53 45 72 72 |Con*/)..|{..OSErr| |00001920| 09 65 72 72 3b 0d 09 0d | 09 69 66 20 28 28 65 72 |.err;...|.if ((er| |00001930| 72 20 3d 20 43 68 65 63 | 6b 41 70 70 6c 65 45 76 |r = Chec|kAppleEv| |00001940| 65 6e 74 46 6f 72 4d 69 | 73 73 69 6e 67 50 61 72 |entForMi|ssingPar| |00001950| 61 6d 73 28 74 68 65 41 | 70 70 6c 65 45 76 65 6e |ams(theA|ppleEven| |00001960| 74 29 29 20 21 3d 20 6e | 6f 45 72 72 29 0d 09 09 |t)) != n|oErr)...| |00001970| 72 65 74 75 72 6e 20 65 | 72 72 3b 0d 0d 09 72 65 |return e|rr;...re| |00001980| 74 75 72 6e 28 43 72 65 | 61 74 65 4e 65 77 44 6f |turn(Cre|ateNewDo| |00001990| 63 75 6d 65 6e 74 28 29 | 29 3b 0d 09 7d 0d 0d 0d |cument()|);..}...| |000019a0| 70 61 73 63 61 6c 20 4f | 53 45 72 72 0d 48 61 6e |pascal O|SErr.Han| |000019b0| 64 6c 65 4f 70 65 6e 44 | 6f 63 75 6d 65 6e 74 73 |dleOpenD|ocuments| |000019c0| 28 41 70 70 6c 65 45 76 | 65 6e 74 20 2a 74 68 65 |(AppleEv|ent *the| |000019d0| 41 70 70 6c 65 45 76 65 | 6e 74 2c 41 70 70 6c 65 |AppleEve|nt,Apple| |000019e0| 45 76 65 6e 74 20 2a 20 | 2f 2a 72 65 70 6c 79 2a |Event * |/*reply*| |000019f0| 2f 2c 6c 6f 6e 67 20 2f | 2a 72 65 66 43 6f 6e 2a |/,long /|*refCon*| |00001a00| 2f 29 0d 09 7b 0d 09 41 | 45 44 65 73 63 4c 69 73 |/)..{..A|EDescLis| |00001a10| 74 09 09 09 64 6f 63 75 | 6d 65 6e 74 4c 69 73 74 |t...docu|mentList| |00001a20| 3b 0d 09 4f 53 45 72 72 | 09 09 09 09 65 72 72 3b |;..OSErr|....err;| |00001a30| 0d 09 0d 09 69 66 20 28 | 28 65 72 72 20 3d 20 41 |....if (|(err = A| |00001a40| 45 47 65 74 50 61 72 61 | 6d 44 65 73 63 28 74 68 |EGetPara|mDesc(th| |00001a50| 65 41 70 70 6c 65 45 76 | 65 6e 74 2c 6b 65 79 44 |eAppleEv|ent,keyD| |00001a60| 69 72 65 63 74 4f 62 6a | 65 63 74 2c 74 79 70 65 |irectObj|ect,type| |00001a70| 41 45 4c 69 73 74 2c 26 | 64 6f 63 75 6d 65 6e 74 |AEList,&|document| |00001a80| 4c 69 73 74 29 29 20 21 | 3d 20 6e 6f 45 72 72 29 |List)) !|= noErr)| |00001a90| 0d 09 09 72 65 74 75 72 | 6e 20 65 72 72 3b 0d 0d |...retur|n err;..| |00001aa0| 09 69 66 20 28 28 65 72 | 72 20 3d 20 43 68 65 63 |.if ((er|r = Chec| |00001ab0| 6b 41 70 70 6c 65 45 76 | 65 6e 74 46 6f 72 4d 69 |kAppleEv|entForMi| |00001ac0| 73 73 69 6e 67 50 61 72 | 61 6d 73 28 74 68 65 41 |ssingPar|ams(theA| |00001ad0| 70 70 6c 65 45 76 65 6e | 74 29 29 20 21 3d 20 6e |ppleEven|t)) != n| |00001ae0| 6f 45 72 72 29 0d 09 09 | 72 65 74 75 72 6e 20 65 |oErr)...|return e| |00001af0| 72 72 3b 0d 0d 09 65 72 | 72 20 3d 20 46 6f 72 45 |rr;...er|r = ForE| |00001b00| 61 63 68 44 6f 63 75 6d | 65 6e 74 49 6e 4c 69 73 |achDocum|entInLis| |00001b10| 74 28 64 6f 63 75 6d 65 | 6e 74 4c 69 73 74 2c 26 |t(docume|ntList,&| |00001b20| 4f 70 65 6e 44 6f 63 75 | 6d 65 6e 74 2c 6e 69 6c |OpenDocu|ment,nil| |00001b30| 29 3b 0d 09 28 76 6f 69 | 64 29 20 41 45 44 69 73 |);..(voi|d) AEDis| |00001b40| 70 6f 73 65 44 65 73 63 | 28 26 64 6f 63 75 6d 65 |poseDesc|(&docume| |00001b50| 6e 74 4c 69 73 74 29 3b | 0d 09 72 65 74 75 72 6e |ntList);|..return| |00001b60| 20 65 72 72 3b 0d 09 7d | 0d 0d 0d 70 61 73 63 61 | err;..}|...pasca| |00001b70| 6c 20 4f 53 45 72 72 0d | 48 61 6e 64 6c 65 50 72 |l OSErr.|HandlePr| |00001b80| 69 6e 74 44 6f 63 75 6d | 65 6e 74 73 28 41 70 70 |intDocum|ents(App| |00001b90| 6c 65 45 76 65 6e 74 20 | 2a 74 68 65 41 70 70 6c |leEvent |*theAppl| |00001ba0| 65 45 76 65 6e 74 2c 41 | 70 70 6c 65 45 76 65 6e |eEvent,A|ppleEven| |00001bb0| 74 20 2a 20 2f 2a 72 65 | 70 6c 79 2a 2f 2c 6c 6f |t * /*re|ply*/,lo| |00001bc0| 6e 67 20 2f 2a 72 65 66 | 43 6f 6e 2a 2f 29 0d 09 |ng /*ref|Con*/)..| |00001bd0| 7b 0d 09 41 45 44 65 73 | 63 4c 69 73 74 09 09 09 |{..AEDes|cList...| |00001be0| 64 6f 63 75 6d 65 6e 74 | 4c 69 73 74 3b 0d 23 69 |document|List;.#i| |00001bf0| 66 09 71 55 73 65 51 75 | 69 63 6b 44 72 61 77 47 |f.qUseQu|ickDrawG| |00001c00| 58 0d 09 41 45 44 65 73 | 63 4c 69 73 74 09 09 09 |X..AEDes|cList...| |00001c10| 64 65 73 6b 74 6f 70 50 | 72 69 6e 74 65 72 4c 69 |desktopP|rinterLi| |00001c20| 73 74 3b 0d 09 46 53 53 | 70 65 63 09 09 09 09 74 |st;..FSS|pec....t| |00001c30| 68 65 50 72 69 6e 74 65 | 72 46 53 53 70 65 63 3b |hePrinte|rFSSpec;| |00001c40| 0d 09 42 6f 6f 6c 65 61 | 6e 09 09 09 09 64 72 61 |..Boolea|n....dra| |00001c50| 67 67 65 64 54 6f 44 65 | 73 6b 74 6f 70 50 72 69 |ggedToDe|sktopPri| |00001c60| 6e 74 65 72 20 3d 20 66 | 61 6c 73 65 3b 0d 23 65 |nter = f|alse;.#e| |00001c70| 6e 64 69 66 0d 09 4f 53 | 45 72 72 09 09 09 09 65 |ndif..OS|Err....e| |00001c80| 72 72 3b 0d 09 0d 09 69 | 66 20 28 28 65 72 72 20 |rr;....i|f ((err | |00001c90| 3d 20 41 45 47 65 74 50 | 61 72 61 6d 44 65 73 63 |= AEGetP|aramDesc| |00001ca0| 28 74 68 65 41 70 70 6c | 65 45 76 65 6e 74 2c 6b |(theAppl|eEvent,k| |00001cb0| 65 79 44 69 72 65 63 74 | 4f 62 6a 65 63 74 2c 74 |eyDirect|Object,t| |00001cc0| 79 70 65 41 45 4c 69 73 | 74 2c 26 64 6f 63 75 6d |ypeAELis|t,&docum| |00001cd0| 65 6e 74 4c 69 73 74 29 | 29 20 21 3d 20 6e 6f 45 |entList)|) != noE| |00001ce0| 72 72 29 0d 09 09 72 65 | 74 75 72 6e 20 65 72 72 |rr)...re|turn err| |00001cf0| 3b 0d 0d 23 69 66 09 71 | 55 73 65 51 75 69 63 6b |;..#if.q|UseQuick| |00001d00| 44 72 61 77 47 58 0d 09 | 69 66 20 28 6e 6f 45 72 |DrawGX..|if (noEr| |00001d10| 72 20 3d 3d 20 41 45 47 | 65 74 41 74 74 72 69 62 |r == AEG|etAttrib| |00001d20| 75 74 65 44 65 73 63 28 | 74 68 65 41 70 70 6c 65 |uteDesc(|theApple| |00001d30| 45 76 65 6e 74 2c 6b 65 | 79 4f 70 74 69 6f 6e 61 |Event,ke|yOptiona| |00001d40| 6c 4b 65 79 77 6f 72 64 | 41 74 74 72 2c 74 79 70 |lKeyword|Attr,typ| |00001d50| 65 41 45 4c 69 73 74 2c | 26 64 65 73 6b 74 6f 70 |eAEList,|&desktop| |00001d60| 50 72 69 6e 74 65 72 4c | 69 73 74 29 29 0d 09 09 |PrinterL|ist))...| |00001d70| 64 72 61 67 67 65 64 54 | 6f 44 65 73 6b 74 6f 70 |draggedT|oDesktop| |00001d80| 50 72 69 6e 74 65 72 20 | 3d 20 74 72 75 65 3b 0d |Printer |= true;.| |00001d90| 23 65 6e 64 69 66 0d 0d | 09 69 66 20 28 28 65 72 |#endif..|.if ((er| |00001da0| 72 20 3d 20 43 68 65 63 | 6b 41 70 70 6c 65 45 76 |r = Chec|kAppleEv| |00001db0| 65 6e 74 46 6f 72 4d 69 | 73 73 69 6e 67 50 61 72 |entForMi|ssingPar| |00001dc0| 61 6d 73 28 74 68 65 41 | 70 70 6c 65 45 76 65 6e |ams(theA|ppleEven| |00001dd0| 74 29 29 20 21 3d 20 6e | 6f 45 72 72 29 0d 09 09 |t)) != n|oErr)...| |00001de0| 72 65 74 75 72 6e 20 65 | 72 72 3b 0d 0d 23 69 66 |return e|rr;..#if| |00001df0| 09 71 55 73 65 51 75 69 | 63 6b 44 72 61 77 47 58 |.qUseQui|ckDrawGX| |00001e00| 0d 09 69 66 20 28 64 72 | 61 67 67 65 64 54 6f 44 |..if (dr|aggedToD| |00001e10| 65 73 6b 74 6f 70 50 72 | 69 6e 74 65 72 29 0d 09 |esktopPr|inter)..| |00001e20| 09 7b 0d 09 09 44 65 73 | 63 54 79 70 65 09 09 09 |.{...Des|cType...| |00001e30| 72 65 74 75 72 6e 65 64 | 54 79 70 65 3b 0d 09 09 |returned|Type;...| |00001e40| 53 69 7a 65 09 09 09 09 | 61 63 74 75 61 6c 53 69 |Size....|actualSi| |00001e50| 7a 65 3b 0d 09 09 41 45 | 4b 65 79 77 6f 72 64 09 |ze;...AE|Keyword.| |00001e60| 09 09 6b 65 79 77 6f 72 | 64 3b 0d 0d 09 09 65 72 |..keywor|d;....er| |00001e70| 72 20 3d 20 41 45 47 65 | 74 4e 74 68 50 74 72 28 |r = AEGe|tNthPtr(| |00001e80| 26 64 65 73 6b 74 6f 70 | 50 72 69 6e 74 65 72 4c |&desktop|PrinterL| |00001e90| 69 73 74 2c 31 2c 74 79 | 70 65 46 53 53 2c 26 6b |ist,1,ty|peFSS,&k| |00001ea0| 65 79 77 6f 72 64 2c 26 | 72 65 74 75 72 6e 65 64 |eyword,&|returned| |00001eb0| 54 79 70 65 2c 0d 09 09 | 09 09 09 09 09 28 50 74 |Type,...|.....(Pt| |00001ec0| 72 29 20 26 74 68 65 50 | 72 69 6e 74 65 72 46 53 |r) &theP|rinterFS| |00001ed0| 53 70 65 63 2c 73 69 7a | 65 6f 66 28 74 68 65 50 |Spec,siz|eof(theP| |00001ee0| 72 69 6e 74 65 72 46 53 | 53 70 65 63 29 2c 26 61 |rinterFS|Spec),&a| |00001ef0| 63 74 75 61 6c 53 69 7a | 65 29 3b 0d 0d 09 09 28 |ctualSiz|e);....(| |00001f00| 76 6f 69 64 29 20 41 45 | 44 69 73 70 6f 73 65 44 |void) AE|DisposeD| |00001f10| 65 73 63 28 26 64 65 73 | 6b 74 6f 70 50 72 69 6e |esc(&des|ktopPrin| |00001f20| 74 65 72 4c 69 73 74 29 | 3b 0d 09 09 7d 0d 09 65 |terList)|;...}..e| |00001f30| 72 72 20 3d 20 46 6f 72 | 45 61 63 68 44 6f 63 75 |rr = For|EachDocu| |00001f40| 6d 65 6e 74 49 6e 4c 69 | 73 74 28 64 6f 63 75 6d |mentInLi|st(docum| |00001f50| 65 6e 74 4c 69 73 74 2c | 26 50 72 69 6e 74 44 6f |entList,|&PrintDo| |00001f60| 63 75 6d 65 6e 74 2c 64 | 72 61 67 67 65 64 54 6f |cument,d|raggedTo| |00001f70| 44 65 73 6b 74 6f 70 50 | 72 69 6e 74 65 72 20 3f |DesktopP|rinter ?| |00001f80| 20 26 74 68 65 50 72 69 | 6e 74 65 72 46 53 53 70 | &thePri|nterFSSp| |00001f90| 65 63 20 3a 20 4e 55 4c | 4c 29 3b 0d 09 28 76 6f |ec : NUL|L);..(vo| |00001fa0| 69 64 29 20 41 45 44 69 | 73 70 6f 73 65 44 65 73 |id) AEDi|sposeDes| |00001fb0| 63 28 26 64 6f 63 75 6d | 65 6e 74 4c 69 73 74 29 |c(&docum|entList)| |00001fc0| 3b 0d 23 65 6c 73 65 0d | 09 65 72 72 20 3d 20 46 |;.#else.|.err = F| |00001fd0| 6f 72 45 61 63 68 44 6f | 63 75 6d 65 6e 74 49 6e |orEachDo|cumentIn| |00001fe0| 4c 69 73 74 28 64 6f 63 | 75 6d 65 6e 74 4c 69 73 |List(doc|umentLis| |00001ff0| 74 2c 26 50 72 69 6e 74 | 44 6f 63 75 6d 65 6e 74 |t,&Print|Document| |00002000| 2c 6e 69 6c 29 3b 0d 23 | 65 6e 64 69 66 0d 0d 09 |,nil);.#|endif...| |00002010| 72 65 74 75 72 6e 20 65 | 72 72 3b 0d 09 7d 0d 0d |return e|rr;..}..| |00002020| 0d 70 61 73 63 61 6c 20 | 4f 53 45 72 72 0d 48 61 |.pascal |OSErr.Ha| |00002030| 6e 64 6c 65 51 75 69 74 | 41 70 70 6c 69 63 61 74 |ndleQuit|Applicat| |00002040| 69 6f 6e 28 41 70 70 6c | 65 45 76 65 6e 74 20 2a |ion(Appl|eEvent *| |00002050| 74 68 65 41 70 70 6c 65 | 45 76 65 6e 74 2c 41 70 |theApple|Event,Ap| |00002060| 70 6c 65 45 76 65 6e 74 | 20 2a 20 2f 2a 20 72 65 |pleEvent| * /* re| |00002070| 70 6c 79 20 2a 2f 2c 6c | 6f 6e 67 20 2f 2a 20 72 |ply */,l|ong /* r| |00002080| 65 66 43 6f 6e 20 2a 2f | 29 0d 09 7b 0d 09 4f 53 |efCon */|)..{..OS| |00002090| 45 72 72 09 65 72 72 3b | 0d 09 0d 09 69 66 20 28 |Err.err;|....if (| |000020a0| 28 65 72 72 20 3d 20 43 | 68 65 63 6b 41 70 70 6c |(err = C|heckAppl| |000020b0| 65 45 76 65 6e 74 46 6f | 72 4d 69 73 73 69 6e 67 |eEventFo|rMissing| |000020c0| 50 61 72 61 6d 73 28 74 | 68 65 41 70 70 6c 65 45 |Params(t|heAppleE| |000020d0| 76 65 6e 74 29 29 20 21 | 3d 20 6e 6f 45 72 72 29 |vent)) !|= noErr)| |000020e0| 0d 09 09 72 65 74 75 72 | 6e 20 65 72 72 3b 0d 0d |...retur|n err;..| |000020f0| 09 67 44 6f 6e 65 20 3d | 20 51 75 69 74 41 70 70 |.gDone =| QuitApp| |00002100| 6c 69 63 61 74 69 6f 6e | 28 29 3b 0d 09 0d 09 69 |lication|();....i| |00002110| 66 20 28 67 44 6f 6e 65 | 29 0d 09 09 72 65 74 75 |f (gDone|)...retu| |00002120| 72 6e 20 6e 6f 45 72 72 | 3b 0d 09 65 6c 73 65 0d |rn noErr|;..else.| |00002130| 09 09 72 65 74 75 72 6e | 20 75 73 65 72 43 61 6e |..return| userCan| |00002140| 63 65 6c 65 64 45 72 72 | 3b 0d 09 7d 0d 0d 0d 2f |celedErr|;..}.../| |00002150| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////| |00002160| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////| |00002170| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////| |00002180| 2f 2f 2f 2f 2f 2f 2f 2f | 2f 2f 2f 2f 2f 2f 2f 2f |////////|////////| |00002190| 2f 2f 2f 2f 2f 2f 2f 0d | 2f 2f 0d 2f 2f 09 44 69 |///////.|//.//.Di| |000021a0| 73 70 6c 61 79 20 4d 61 | 6e 61 67 65 72 20 53 75 |splay Ma|nager Su| |000021b0| 69 74 65 20 69 73 20 d2 | 55 6e 64 65 72 20 43 6f |ite is .|Under Co| |000021c0| 6e 73 74 72 75 63 74 69 | 6f 6e d3 0d 2f 2f 0d 2f |nstructi|on..//./| |000021d0| 2f 09 54 6f 20 44 6f 3a | 20 43 68 65 63 6b 20 45 |/.To Do:| Check E| |000021e0| 52 53 20 66 6f 72 20 44 | 69 73 70 6c 61 79 20 4d |RS for D|isplay M| |000021f0| 61 6e 61 67 65 72 20 65 | 76 65 6e 74 73 0d 0d 70 |anager e|vents..p| |00002200| 61 73 63 61 6c 20 4f 53 | 45 72 72 0d 48 61 6e 64 |ascal OS|Err.Hand| |00002210| 6c 65 53 79 73 74 65 6d | 43 6f 6e 66 69 67 4e 6f |leSystem|ConfigNo| |00002220| 74 69 63 65 28 41 70 70 | 6c 65 45 76 65 6e 74 20 |tice(App|leEvent | |00002230| 2a 74 68 65 41 70 70 6c | 65 45 76 65 6e 74 2c 41 |*theAppl|eEvent,A| |00002240| 70 70 6c 65 45 76 65 6e | 74 20 2a 20 2f 2a 20 72 |ppleEven|t * /* r| |00002250| 65 70 6c 79 20 2a 2f 2c | 6c 6f 6e 67 20 2f 2a 20 |eply */,|long /* | |00002260| 72 65 66 43 6f 6e 20 2a | 2f 29 0d 09 7b 0d 09 41 |refCon *|/)..{..A| |00002270| 45 44 65 73 63 4c 69 73 | 74 09 64 69 73 70 6c 61 |EDescLis|t.displa| |00002280| 79 4c 69 73 74 3b 0d 09 | 6c 6f 6e 67 09 09 64 69 |yList;..|long..di| |00002290| 73 70 6c 61 79 43 6f 75 | 6e 74 2c 64 69 73 70 6c |splayCou|nt,displ| |000022a0| 61 79 49 6e 64 65 78 3b | 0d 09 4f 53 45 72 72 09 |ayIndex;|..OSErr.| |000022b0| 09 65 72 72 3b 0d 09 0d | 09 44 65 62 75 67 53 74 |.err;...|.DebugSt| |000022c0| 72 28 28 53 74 72 69 6e | 67 50 74 72 29 20 22 5c |r((Strin|gPtr) "\| |000022d0| 70 47 6f 74 20 61 20 44 | 69 73 70 6c 61 79 20 4d |pGot a D|isplay M| |000022e0| 61 6e 61 67 65 72 20 45 | 76 65 6e 74 21 22 29 3b |anager E|vent!");| |000022f0| 0d 09 0d 09 69 66 20 28 | 28 65 72 72 20 3d 20 41 |....if (|(err = A| |00002300| 45 47 65 74 50 61 72 61 | 6d 44 65 73 63 28 74 68 |EGetPara|mDesc(th| |00002310| 65 41 70 70 6c 65 45 76 | 65 6e 74 2c 6b 41 45 44 |eAppleEv|ent,kAED| |00002320| 69 73 70 6c 61 79 4e 6f | 74 69 63 65 2c 74 79 70 |isplayNo|tice,typ| |00002330| 65 41 45 4c 69 73 74 2c | 26 64 69 73 70 6c 61 79 |eAEList,|&display| |00002340| 4c 69 73 74 29 29 20 21 | 3d 20 6e 6f 45 72 72 29 |List)) !|= noErr)| |00002350| 0d 09 09 72 65 74 75 72 | 6e 20 65 72 72 3b 0d 09 |...retur|n err;..| |00002360| 0d 09 69 66 20 28 28 65 | 72 72 20 3d 20 43 68 65 |..if ((e|rr = Che| |00002370| 63 6b 41 70 70 6c 65 45 | 76 65 6e 74 46 6f 72 4d |ckAppleE|ventForM| |00002380| 69 73 73 69 6e 67 50 61 | 72 61 6d 73 28 74 68 65 |issingPa|rams(the| |00002390| 41 70 70 6c 65 45 76 65 | 6e 74 29 29 20 21 3d 20 |AppleEve|nt)) != | |000023a0| 6e 6f 45 72 72 29 0d 09 | 09 72 65 74 75 72 6e 20 |noErr)..|.return | |000023b0| 65 72 72 3b 0d 09 0d 09 | 69 66 20 28 28 65 72 72 |err;....|if ((err| |000023c0| 20 3d 20 41 45 43 6f 75 | 6e 74 49 74 65 6d 73 28 | = AECou|ntItems(| |000023d0| 26 64 69 73 70 6c 61 79 | 4c 69 73 74 2c 26 64 69 |&display|List,&di| |000023e0| 73 70 6c 61 79 43 6f 75 | 6e 74 29 29 20 21 3d 20 |splayCou|nt)) != | |000023f0| 6e 6f 45 72 72 29 0d 09 | 09 72 65 74 75 72 6e 20 |noErr)..|.return | |00002400| 65 72 72 3b 0d 0d 09 66 | 6f 72 20 28 64 69 73 70 |err;...f|or (disp| |00002410| 6c 61 79 49 6e 64 65 78 | 20 3d 20 31 3b 20 64 69 |layIndex| = 1; di| |00002420| 73 70 6c 61 79 49 6e 64 | 65 78 3c 3d 64 69 73 70 |splayInd|ex<=disp| |00002430| 6c 61 79 43 6f 75 6e 74 | 3b 20 64 69 73 70 6c 61 |layCount|; displa| |00002440| 79 49 6e 64 65 78 2b 2b | 29 0d 09 09 7b 0d 09 09 |yIndex++|)...{...| |00002450| 44 65 62 75 67 53 74 72 | 28 28 53 74 72 69 6e 67 |DebugStr|((String| |00002460| 50 74 72 29 20 22 5c 70 | 50 72 6f 63 65 73 73 69 |Ptr) "\p|Processi| |00002470| 6e 67 20 61 20 64 69 73 | 70 6c 61 79 22 29 3b 0d |ng a dis|play");.| |00002480| 09 09 0d 09 09 2f 2f 09 | 47 61 74 68 65 72 20 75 |.....//.|Gather u| |00002490| 70 20 61 6c 6c 20 74 68 | 65 20 6f 6c 64 20 61 6e |p all th|e old an| |000024a0| 64 20 6e 65 77 20 64 69 | 73 70 6c 61 79 20 72 65 |d new di|splay re| |000024b0| 63 74 61 6e 67 6c 65 73 | 20 69 6e 74 6f 20 61 6e |ctangles| into an| |000024c0| 20 6f 6c 64 44 65 73 6b | 52 65 67 69 6f 6e 20 61 | oldDesk|Region a| |000024d0| 6e 64 20 61 20 6e 65 77 | 44 65 73 6b 52 65 67 69 |nd a new|DeskRegi| |000024e0| 6f 6e 0d 09 09 7d 0d 0d | 09 2f 2f 09 72 75 6e 20 |on...}..|.//.run | |000024f0| 74 68 72 6f 75 67 68 20 | 61 6c 6c 20 77 69 6e 64 |through |all wind| |00002500| 6f 77 73 20 63 61 6c 6c | 69 6e 67 20 6b 65 65 70 |ows call|ing keep| |00002510| 69 6e 67 20 61 6c 6c 20 | 77 69 6e 64 6f 77 73 20 |ing all |windows | |00002520| 77 68 69 63 68 20 77 65 | 72 65 20 6f 6e 73 63 72 |which we|re onscr| |00002530| 65 65 6e 20 69 6e 20 74 | 68 65 20 6f 6c 64 44 65 |een in t|he oldDe| |00002540| 73 6b 52 65 67 69 6f 6e | 0d 09 2f 2f 09 6f 6e 73 |skRegion|..//.ons| |00002550| 63 72 65 65 6e 20 69 6e | 20 74 68 65 20 6e 65 77 |creen in| the new| |00002560| 20 77 6f 72 6c 64 2e 20 | 57 65 20 73 68 6f 75 6c | world. |We shoul| |00002570| 64 20 72 65 61 6c 6c 79 | 20 62 65 20 63 61 6c 6c |d really| be call| |00002580| 69 6e 67 20 61 20 6d 65 | 74 68 6f 64 20 74 6f 20 |ing a me|thod to | |00002590| 64 6f 20 74 68 69 73 20 | 73 6f 20 74 68 61 74 20 |do this |so that | |000025a0| 77 69 6e 64 6f 77 73 0d | 09 2f 2f 09 63 61 6e 20 |windows.|.//.can | |000025b0| 69 6e 64 69 76 69 64 75 | 61 6c 6c 79 20 64 65 61 |individu|ally dea| |000025c0| 6c 20 77 69 74 68 20 74 | 68 69 6e 67 73 20 69 6e |l with t|hings in| |000025d0| 20 61 20 6d 61 6e 6e 65 | 72 20 77 68 69 63 68 20 | a manne|r which | |000025e0| 74 68 65 79 20 63 61 6e | 20 6f 76 65 72 72 69 64 |they can| overrid| |000025f0| 65 2e 0d 0d 0d 09 72 65 | 74 75 72 6e 20 65 72 72 |e.....re|turn err| |00002600| 41 45 45 76 65 6e 74 4e | 6f 74 48 61 6e 64 6c 65 |AEEventN|otHandle| |00002610| 64 3b 09 2f 2f 09 77 65 | 20 72 65 61 6c 6c 79 20 |d;.//.we| really | |00002620| 64 6f 6e d5 74 20 68 61 | 6e 64 6c 65 20 74 68 69 |don.t ha|ndle thi| |00002630| 73 20 79 65 74 2e 2e 2e | 0d 09 7d 0d 0d 23 69 66 |s yet...|..}..#if| |00002640| 09 71 49 6e 6c 69 6e 65 | 49 6e 70 75 74 41 77 61 |.qInline|InputAwa| |00002650| 72 65 0d 0d 70 61 73 63 | 61 6c 20 4f 53 45 72 72 |re..pasc|al OSErr| |00002660| 0d 48 61 6e 64 6c 65 54 | 65 78 74 53 65 72 76 69 |.HandleT|extServi| |00002670| 63 65 73 55 70 64 61 74 | 65 41 63 74 69 76 65 49 |cesUpdat|eActiveI| |00002680| 6e 70 75 74 41 72 65 61 | 28 41 70 70 6c 65 45 76 |nputArea|(AppleEv| |00002690| 65 6e 74 20 2a 74 68 65 | 41 70 70 6c 65 45 76 65 |ent *the|AppleEve| |000026a0| 6e 74 2c 41 70 70 6c 65 | 45 76 65 6e 74 20 2a 72 |nt,Apple|Event *r| |000026b0| 65 70 6c 79 2c 6c 6f 6e | 67 20 72 65 66 43 6f 6e |eply,lon|g refCon| |000026c0| 29 0d 09 7b 0d 09 44 65 | 62 75 67 53 74 72 28 22 |)..{..De|bugStr("| |000026d0| 5c 70 54 65 78 74 53 65 | 72 76 69 63 65 73 55 70 |\pTextSe|rvicesUp| |000026e0| 64 61 74 65 41 63 74 69 | 76 65 49 6e 70 75 74 41 |dateActi|veInputA| |000026f0| 72 65 61 22 29 3b 0d 09 | 72 65 74 75 72 6e 20 65 |rea");..|return e| |00002700| 72 72 41 45 45 76 65 6e | 74 4e 6f 74 48 61 6e 64 |rrAEEven|tNotHand| |00002710| 6c 65 64 3b 09 09 09 2f | 2f 09 77 65 20 72 65 61 |led;.../|/.we rea| |00002720| 6c 6c 79 20 64 6f 6e d5 | 74 20 68 61 6e 64 6c 65 |lly don.|t handle| |00002730| 20 74 68 69 73 20 79 65 | 74 2e 2e 2e 0d 09 7d 0d | this ye|t.....}.| |00002740| 0d 70 61 73 63 61 6c 20 | 4f 53 45 72 72 0d 48 61 |.pascal |OSErr.Ha| |00002750| 6e 64 6c 65 54 65 78 74 | 53 65 72 76 69 63 65 73 |ndleText|Services| |00002760| 50 6f 73 32 4f 66 66 73 | 65 74 28 41 70 70 6c 65 |Pos2Offs|et(Apple| |00002770| 45 76 65 6e 74 20 2a 74 | 68 65 41 70 70 6c 65 45 |Event *t|heAppleE| |00002780| 76 65 6e 74 2c 41 70 70 | 6c 65 45 76 65 6e 74 20 |vent,App|leEvent | |00002790| 2a 72 65 70 6c 79 2c 6c | 6f 6e 67 20 72 65 66 43 |*reply,l|ong refC| |000027a0| 6f 6e 29 0d 09 7b 0d 09 | 44 65 62 75 67 53 74 72 |on)..{..|DebugStr| |000027b0| 28 22 5c 70 54 65 78 74 | 53 65 72 76 69 63 65 73 |("\pText|Services| |000027c0| 50 6f 73 32 4f 66 66 73 | 65 74 22 29 3b 0d 09 72 |Pos2Offs|et");..r| |000027d0| 65 74 75 72 6e 20 65 72 | 72 41 45 45 76 65 6e 74 |eturn er|rAEEvent| |000027e0| 4e 6f 74 48 61 6e 64 6c | 65 64 3b 09 09 09 2f 2f |NotHandl|ed;...//| |000027f0| 09 77 65 20 72 65 61 6c | 6c 79 20 64 6f 6e d5 74 |.we real|ly don.t| |00002800| 20 68 61 6e 64 6c 65 20 | 74 68 69 73 20 79 65 74 | handle |this yet| |00002810| 2e 2e 2e 0d 09 7d 0d 09 | 0d 70 61 73 63 61 6c 20 |.....}..|.pascal | |00002820| 4f 53 45 72 72 0d 48 61 | 6e 64 6c 65 54 65 78 74 |OSErr.Ha|ndleText| |00002830| 53 65 72 76 69 63 65 73 | 4f 66 66 73 65 74 32 50 |Services|Offset2P| |00002840| 6f 73 28 41 70 70 6c 65 | 45 76 65 6e 74 20 2a 74 |os(Apple|Event *t| |00002850| 68 65 41 70 70 6c 65 45 | 76 65 6e 74 2c 41 70 70 |heAppleE|vent,App| |00002860| 6c 65 45 76 65 6e 74 20 | 2a 72 65 70 6c 79 2c 6c |leEvent |*reply,l| |00002870| 6f 6e 67 20 72 65 66 43 | 6f 6e 29 0d 09 7b 0d 09 |ong refC|on)..{..| |00002880| 44 65 62 75 67 53 74 72 | 28 22 5c 70 54 65 78 74 |DebugStr|("\pText| |00002890| 53 65 72 76 69 63 65 73 | 4f 66 66 73 65 74 32 50 |Services|Offset2P| |000028a0| 6f 73 22 29 3b 0d 09 72 | 65 74 75 72 6e 20 65 72 |os");..r|eturn er| |000028b0| 72 41 45 45 76 65 6e 74 | 4e 6f 74 48 61 6e 64 6c |rAEEvent|NotHandl| |000028c0| 65 64 3b 09 09 09 2f 2f | 09 77 65 20 72 65 61 6c |ed;...//|.we real| |000028d0| 6c 79 20 64 6f 6e d5 74 | 20 68 61 6e 64 6c 65 20 |ly don.t| handle | |000028e0| 74 68 69 73 20 79 65 74 | 2e 2e 2e 0d 09 7d 0d 0d |this yet|.....}..| |000028f0| 23 65 6e 64 69 66 0d 00 | 00 00 00 00 00 00 00 00 |#endif..|........| |00002900| 00 00 01 00 00 00 02 16 | 00 00 01 16 00 00 00 72 |........|.......r| |00002910| 69 6e 67 3b 0d 09 47 72 | 61 66 50 74 72 09 09 09 |ing;..Gr|afPtr...| |00002920| 09 09 6f 6c 64 50 6f 72 | 74 2c 77 69 6e 64 6f 77 |..oldPor|t,window| |00002930| 15 41 70 70 6c 65 45 76 | 65 6e 74 48 61 6e 64 6c |.AppleEv|entHandl| |00002940| 69 6e 67 2e 63 70 02 00 | 00 00 54 45 58 54 4d 4d |ing.cp..|..TEXTMM| |00002950| 00 00 54 45 58 54 4d 4d | 43 43 01 00 00 68 01 00 |..TEXTMM|CC...h..| |00002960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002970| 00 00 a8 2a db 1c 00 00 | 28 77 00 00 02 88 49 74 |...*....|(w....It| |00002980| 65 6d 4c 69 73 74 48 61 | 6e 64 6c 65 09 65 72 72 |emListHa|ndle.err| |00002990| 6f 72 41 6c 65 72 74 49 | 74 65 6d 73 3b 0d 09 54 |orAlertI|tems;..T| |000029a0| 45 48 61 6e 64 6c 65 09 | 09 09 09 61 54 45 48 61 |EHandle.|...aTEHa| |000029b0| 6e 64 6c 65 3b 0d 09 52 | 65 63 74 09 09 09 09 09 |ndle;..R|ect.....| |000029c0| 74 65 78 74 52 65 63 74 | 3b 0d 09 73 68 6f 72 74 |textRect|;..short| |000029d0| 09 09 09 09 09 74 65 78 | 74 48 65 69 67 68 74 3b |.....tex|tHeight;| |000029e0| 0d 09 73 68 6f 72 74 09 | 09 09 09 09 61 64 64 69 |..short.|....addi| |000029f0| 74 69 6f 6e 61 6c 53 70 | 61 63 65 4e 65 65 64 65 |tionalSp|aceNeede| |00002a00| 00 00 00 02 00 00 00 00 | 00 1e 00 57 00 04 02 6c |........|...W...l| |00002a10| 02 ea 00 57 00 04 02 6c | 02 ea 00 00 0c 1c 00 00 |...W...l|........| |00002a20| 00 00 00 00 00 00 00 00 | 00 00 00 96 0f 8d 8a ce |........|........| |00002a30| 3f e5 32 30 00 04 00 00 | 00 01 00 00 00 00 ab 16 |?.20....|........| |00002a40| 1f 83 ab 16 1f 83 aa 81 | 1d 14 00 98 85 cc 00 02 |........|........| |00002a50| 00 02 00 07 1a 53 70 72 | 6f 63 6b 65 74 50 72 6f |.....Spr|ocketPro| |00002a60| 6a ba 53 70 72 6f 63 6b | 65 74 ba 4c 69 62 ba 00 |j.Sprock|et.Lib..| |00002a70| 0f 44 61 76 65 20 46 61 | 6c 6b 65 6e 62 75 72 67 |.Dave Fa|lkenburg| |00002a80| 00 01 37 00 15 41 70 70 | 6c 65 45 76 65 6e 74 48 |..7..App|leEventH| |00002a90| 61 6e 64 6c 69 6e 67 2e | 63 70 00 00 00 00 22 41 |andling.|cp...."A| |00002aa0| 64 64 65 64 20 43 68 6f | 6f 73 65 41 70 70 6c 69 |dded Cho|oseAppli| |00002ab0| 63 61 74 69 6f 6e 41 73 | 41 45 54 61 72 67 65 74 |cationAs|AETarget| |00002ac0| 2e 00 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |.....H..|Monaco..| |00002ad0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002ae0| 00 00 00 00 00 00 00 00 | 00 03 00 04 00 58 00 04 |........|.....X..| |00002af0| 01 a5 02 78 00 58 00 04 | 01 a5 02 78 ad 0e 9c 68 |...x.X..|...x...h| |00002b00| 00 00 20 79 00 00 20 7d | 00 00 1e 7d 01 00 00 00 |.. y.. }|...}....| |00002b10| 00 04 00 01 00 01 00 00 | 01 00 00 00 02 16 00 00 |........|........| |00002b20| 01 16 00 00 00 72 00 df | 49 9c 10 e6 00 00 00 1c |.....r..|I.......| |00002b30| 00 72 00 02 4d 50 53 52 | 00 02 00 1a 63 6b 69 64 |.r..MPSR|....ckid| |00002b40| 00 00 00 3e 4d 57 42 42 | 00 00 00 4a 07 d1 ff ff |...>MWBB|...J....| |00002b50| 00 00 00 00 00 00 00 00 | 03 f0 ff ff 00 00 00 06 |........|........| |00002b60| 00 00 00 00 03 ed ff ff | 00 00 00 c2 00 00 00 00 |........|........| |00002b70| 00 80 ff ff 00 00 00 28 | 00 00 00 00 03 f0 ff ff |.......(|........| |00002b80| 00 00 01 0e 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002b90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002ba0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002bb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002bc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002bd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| |00002bf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........| +--------+-------------------------+-------------------------+--------+--------+